new;
rndseed 1;
n=30;
x0=rndu(n,1)+1;
e=rndn(n,1);
y0=1+x0+e;          @data@

{vnam,m,b1,stb,vc,stderr,sigma,cx,rsq,resid,dwstat}=ols(0,y0,x0);
{vnam,m,b2,stb,vc,stderr,sigma,cx,rsq,resid,dwstat}=ols(0,y0,x0~x0^2);

/* b2[2]=b2[2]-1.5;
b2[3]=b2[3]+1;*/

x=seqa(0,.1,61);

y1=(ones(rows(x),1)~x)*b1;
y2=(ones(rows(x),1)~x~x^2)*b2;

library pgraph;
#include graphon.g;
graphon;                

begwind;
window(2,2,0);
graphset;

_pmsgstr="Model 1: linear\000Model 2: quadratic";
_pmsgctl={4.2 4 .15 0 1 15 0,
          3.2 30 .15 0 1 15 0};     

/* plot the data */	  

/* y0=y0+e; */
_psym=x0~y0~ones(n,1)*8~ones(n,1)*0~ones(n,1)*15~ones(n,1)*1~ones(n,1)*0; 

ylabel("y");
xlabel("x");
ytics(-10,45,5,1);
xy(x,y1~y2);

endwind;

WinPrintPQG(_graphon_pqg,"-t EPS  -o P -f isq-graph.ps");   












